package birdsong.server;

import birdsong.comm.ServerSideMessage;


/**
 * The message that is used from the server to the client. It has implemented the interface ServerSideMessage
 * @author Edgar
 *
 */
public class mensagem implements ServerSideMessage{

	Type type;
	String Payload;
	String clientNickName;
	
	
	
	/**
	 * Constructor of the message mensagem
	 * @param type  type of message
	 * @param payload depending the type of message it can be null, an message or a nickname
	 * @param clientNickName nickname that sends the message
	 */
	public mensagem(Type type, String payload, String clientNickName) {
		super();
		this.type = type;
		Payload = payload;
		this.clientNickName = clientNickName;
	}

	
	@Override
	public Type getType() {
		
		return type;
	}

	@Override
	public String getPayload() {
		
		return Payload;
	}

	@Override
	public String getClientNickname() {
		
		return clientNickName;
	}

}
